package com.company.userController;

import com.company.UseService.UserService;
import com.company.beanconfig.BeanConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController3 {

    private UserService us3;
    private BeanConfig bg;

    public UserController3(UserService us3) {
        System.out.println("111");
        this.us3 = us3;
    }
    @Autowired
    public UserController3(UserService us3, BeanConfig bg) {
        System.out.println("222");
        this.us3 = us3;
        this.bg = bg;
    }

    public void sayHi(){
        us3.doUseService();
        System.out.println("us3");
        bg.hello();
    }
}
